package rbTree;

public class Test {
    public static void main(String[] args) {
        RBTree rbTree = new RBTree();
        int[] array = {4, 2, 6, 1, 3, 5, 15, 7, 16, 14};
        for(int tmp : array){
            rbTree.insert(tmp);
        }
        System.out.println(rbTree.isRBTree(rbTree.root));
        dfs(rbTree.root);
    }
    public static void dfs(RBTree.RBTreeNode root){
        if(root == null){
            return;
        }
        dfs(root.left);
        System.out.print(root.val + " ");
        dfs(root.right);
    }
}
